Crate sp_std

source ·
Expand description

Lowest-abstraction level for the Substrate runtime: just exports useful primitives from std or client/alloc to be used with any code that depends on the runtime. Substrate runtime standard library as compiled when linked with Rust’s standard library.

Modules

Memory allocation APIs.
Utilities for dynamic typing or type reflection.
A module for working with borrowed data.
The Box<T> type for heap allocation.
Shareable mutable containers.
The Clone trait for types that cannot be ‘implicitly copied’.
Utilities for comparing and ordering values.
Traits for conversions between types.
The Default trait for types with a default value.
Utilities for formatting and printing Strings.
Generic hashing support.
Composable external iteration.
Primitive traits and types representing basic properties of types.
Basic functions for dealing with memory.
Additional functionality for numerics.
Overloadable operators.
Prelude of common useful imports.
Manually manage memory through raw pointers.
Single-threaded reference-counting pointers. ‘Rc’ stands for ‘Reference Counted’.
Error handling with the Result type.
Utilities for the slice primitive type.
Utilities for the str primitive type.
Useful synchronization primitives.
Temporal quantification.
A contiguous growable array type with heap-allocated contents, written Vec<T>.

Macros

Feature gate some code that should only be run when std feature is enabled.
Initialize a key-value collection from array.
Creates a Vec containing the arguments.

Structs

A target for core::write! macro - constructs a string in memory.